package day02;

public class Demo {
    public static void main(String[] args) {
        //1)偶数、奇数的判断:
        int num = 5;//带数(6,5)
        if (num%2==0){//5除以2取余是否==0, false,则走else
            System.out.println(num+"是偶数");
        }else{
            System.out.println(num+"是奇数");//5是奇数
        }
        System.out.println("继续执行...");
        //2)满500打8折，不满500打9折:
        double price = 300.0;//带数(600.0,300.0)
        if (price>=500){//false,走else.
            price *= 0.8;
        }else{//不满500
            price *= 0.9;
        }
        System.out.println("最终结算金额为: "+price);
    }
}
